package com.wisezone.studentmanger.model;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

public class Student {
	private int number; // 学号
	private String name; // 姓名
	private Timestamp dateTime; // 入学时间

	public Student() {
		super();
	}

	public Student(String name, int number, Timestamp dateTime) {
		this.name = name;
		this.number = number;
		this.dateTime = dateTime;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getNumber() {
		return number;
	}

	public void setNumber(int number) {
		this.number = number;
	}

	public Timestamp getDateTime() {
		return dateTime;
	}

	public void setDateTime(Timestamp dateTime) {
		this.dateTime = dateTime;
	}

	@Override
	public String toString() {
		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String date = dateFormat.format(this.getDateTime());
		return this.getName() + "\t" + this.getNumber() + "\t" + date;
	}

}
